/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.cast.s3p.tlds;


import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.BodyContent;
import javax.servlet.jsp.tagext.BodyTag;
import javax.servlet.jsp.tagext.Tag;

/**
 *
 * @author carlrami
 */
public class detalleItemsEtiqueta implements BodyTag{

    public void setBodyContent(BodyContent b) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void doInitBody() throws JspException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public int doAfterBody() throws JspException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void setPageContext(PageContext pc) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void setParent(Tag t) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public Tag getParent() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public int doStartTag() throws JspException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public int doEndTag() throws JspException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void release() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    /*PageContext contextoDePagina;
    Controlador control;
    Method metodoLlamado;
    private String name = null;
    private String tipo = null;
    private String metodo = null;

    public void setName(String x){ this.name = x; }
    public void setTipo(String x){ this.tipo = x; }
    public void setMetodo(String x){ this.metodo = x; }

    public void setPageContext(PageContext pc) { this.contextoDePagina = pc; }
    public void setBodyContent(BodyContent b) {}
    public void doInitBody() throws JspException {}
    public int doEndTag() throws JspException { return EVAL_PAGE; }
    public int doAfterBody() throws JspException { return EVAL_PAGE; }
    public void setParent(Tag t) {}
    
    public Tag getParent() { throw new UnsupportedOperationException("Not supported yet."); }

    public int doStartTag() throws JspException {
        ServletContext contextoDeServlet = this.contextoDePagina.getServletContext();
        HttpSession sesion = this.contextoDePagina.getSession();
        this.control = (Controlador) contextoDeServlet.getAttribute("Controlador");
        Class parametros[] = {name.getClass()};
        Object argumentos[] = {name};
        try {
            metodoLlamado = this.control.getClass().getDeclaredMethod(metodo, parametros);
            resultado = (vainaXvaina) metodoLlamado.invoke(this.control, argumentos);
        } catch (IllegalAccessException ex) {
        } catch (IllegalArgumentException ex) {
        } catch (InvocationTargetException ex) {
        } catch (NoSuchMethodException ex) {
        } catch (SecurityException ex) {}
        
        if (resultado != null) {
            sesion.setAttribute(tipo.toString(), this.resultado);
            return EVAL_PAGE;
        } else {
            return SKIP_PAGE;
        }
    }

    public void release() {
        this.contextoDePagina = null;
        this.control = null;
        this.metodoLlamado = null;
        this.name = null;
    }*/
}
